{"ast":null,"code":"import classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport Skeleton from '../skeleton';\nimport StatisticNumber from './Number';\nimport useStyle from './style';\nimport Countdown from './Countdown';\nconst Statistic = props => {\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    style,\n    valueStyle,\n    value = 0,\n    title,\n    valueRender,\n    prefix,\n    suffix,\n    loading = false,\n    onMouseEnter,\n    onMouseLeave,\n    decimalSeparator = '.',\n    groupSeparator = ','\n  } = props;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('statistic', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const valueNode = /*#__PURE__*/React.createElement(StatisticNumber, Object.assign({\n    decimalSeparator: decimalSeparator,\n    groupSeparator: groupSeparator,\n    prefixCls: prefixCls\n  }, props, {\n    value: value\n  }));\n  const cls = classNames(prefixCls, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", {\n    className: cls,\n    style: style,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave\n  }, title && /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-title`\n  }, title), /*#__PURE__*/React.createElement(Skeleton, {\n    paragraph: false,\n    loading: loading,\n    className: `${prefixCls}-skeleton`\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    style: valueStyle,\n    className: `${prefixCls}-content`\n  }, prefix && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-content-prefix`\n  }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-content-suffix`\n  }, suffix)))));\n};\nStatistic.Countdown = Countdown;\nexport default Statistic;","map":{"version":3,"names":["classNames","React","ConfigContext","Skeleton","StatisticNumber","useStyle","Countdown","Statistic","props","prefixCls","customizePrefixCls","className","style","valueStyle","value","title","valueRender","prefix","suffix","loading","onMouseEnter","onMouseLeave","decimalSeparator","groupSeparator","getPrefixCls","direction","useContext","wrapSSR","hashId","valueNode","createElement","Object","assign","cls","paragraph"],"sources":["/data/messenger.client/node_modules/antd/es/statistic/Statistic.js"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport Skeleton from '../skeleton';\nimport StatisticNumber from './Number';\nimport useStyle from './style';\nimport Countdown from './Countdown';\nconst Statistic = props => {\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    style,\n    valueStyle,\n    value = 0,\n    title,\n    valueRender,\n    prefix,\n    suffix,\n    loading = false,\n    onMouseEnter,\n    onMouseLeave,\n    decimalSeparator = '.',\n    groupSeparator = ','\n  } = props;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('statistic', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const valueNode = /*#__PURE__*/React.createElement(StatisticNumber, Object.assign({\n    decimalSeparator: decimalSeparator,\n    groupSeparator: groupSeparator,\n    prefixCls: prefixCls\n  }, props, {\n    value: value\n  }));\n  const cls = classNames(prefixCls, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", {\n    className: cls,\n    style: style,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave\n  }, title && /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-title`\n  }, title), /*#__PURE__*/React.createElement(Skeleton, {\n    paragraph: false,\n    loading: loading,\n    className: `${prefixCls}-skeleton`\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    style: valueStyle,\n    className: `${prefixCls}-content`\n  }, prefix && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-content-prefix`\n  }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-content-suffix`\n  }, suffix)))));\n};\nStatistic.Countdown = Countdown;\nexport default Statistic;"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,eAAe,MAAM,UAAU;AACtC,OAAOC,QAAQ,MAAM,SAAS;AAC9B,OAAOC,SAAS,MAAM,aAAa;AACnC,MAAMC,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IACJC,SAAS,EAAEC,kBAAkB;IAC7BC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,KAAK,GAAG,CAAC;IACTC,KAAK;IACLC,WAAW;IACXC,MAAM;IACNC,MAAM;IACNC,OAAO,GAAG,KAAK;IACfC,YAAY;IACZC,YAAY;IACZC,gBAAgB,GAAG,GAAG;IACtBC,cAAc,GAAG;EACnB,CAAC,GAAGf,KAAK;EACT,MAAM;IACJgB,YAAY;IACZC;EACF,CAAC,GAAGxB,KAAK,CAACyB,UAAU,CAACxB,aAAa,CAAC;EACnC,MAAMO,SAAS,GAAGe,YAAY,CAAC,WAAW,EAAEd,kBAAkB,CAAC;EAC/D,MAAM,CAACiB,OAAO,EAAEC,MAAM,CAAC,GAAGvB,QAAQ,CAACI,SAAS,CAAC;EAC7C,MAAMoB,SAAS,GAAG,aAAa5B,KAAK,CAAC6B,aAAa,CAAC1B,eAAe,EAAE2B,MAAM,CAACC,MAAM,CAAC;IAChFV,gBAAgB,EAAEA,gBAAgB;IAClCC,cAAc,EAAEA,cAAc;IAC9Bd,SAAS,EAAEA;EACb,CAAC,EAAED,KAAK,EAAE;IACRM,KAAK,EAAEA;EACT,CAAC,CAAC,CAAC;EACH,MAAMmB,GAAG,GAAGjC,UAAU,CAACS,SAAS,EAAE;IAChC,CAAE,GAAEA,SAAU,MAAK,GAAGgB,SAAS,KAAK;EACtC,C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